Method and apparatus for reducing bandwidth limited noise in bar code scanner

ABSTRACT

A bar code scanner system includes a laser light source that periodically produces a light beam that is swept across a bar code label. The laser light source is periodically turned &#34;on&#34; and &#34;off&#34; according to a duty cycle. A detector produces a first electric signal representative of received bar code label reflected light and ambient light when the laser light source is on, and produces a second electric signal representative of received ambient light when the light source is &#34;off&#34;. A demodulator circuit, coupled to the detector, provides a first gain to the first electric signal and provides a second gain to the second electric signal. The gains applied are selected such that the signal and signal component produced solely as a result of the ambient light will significantly cancel out one another when the signals are combined. A filter, coupled to the demodulator circuit, receives the electric signals from the demodulator circuit and reduces out-of-band signal components such as noise. When the duty cycle of the laser light source is equal to 50%, the first gain is equal to the inverse of the second gain.

This application is a continuation of application Ser. No. 08/622,234,filed Mar. 20, 1996, now U.S. Pat. No. 5,852,286.

FIELD OF THE INVENTION

The present invention generally relates to bar code scanner circuitryand, more particularly, to bar code scanner circuitry for reducing thenegative effects of modulated ambient light.

BACKGROUND OF THE INVENTION

Bar code scanners are used widely in many diverse applications. Bar codescanners offer a fairly simple means of monitoring large volumes ofitems. Bar code scanners are used, for example, to track inventory, atcheck-out areas of retail stores, and in assembly line manufacturingapplications, for examples.

In bar code technology, a bar code label typically includes a series ofparallel dark and light bars of different widths that represent a uniquecode. Bar code scanners are used to optically detect the coderepresented by the bar code label. A bar code scanner typically includesa laser light source, a photodetector, an amplifier, a filter andprocessing circuitry. The laser light source provides a laser beam whichis swept across, and reflects from, the bar code label. The lightreflected from the bar code label scatters, and some of the scatteredlight is received by the photodetector. The photodetector produces ananalog electric signal. The amplitude of the analog signal representsthe width of one of the series of light and dark bars of the bar codelabel. The amplifier receives the analog electric signal produced by thephotodetector and amplifies the signal.

The amplified electric signal then is provided to a filter, typically abandpass analog filter, which reduces signal components of the amplifiedelectric signal outside of the frequency band of interest. The filteredelectric signal then is provided to the processing circuitry (which caninclude a combination of analog and digital circuitry) for processingthe signal to determine the code represented by the bar code label.

With such processing circuitry, it is desirable to achieve a highsignal-to-noise ratio to ensure that the code represented by the barcode label is accurately detected. The signal-to-noise ratio of thecircuitry depends on many factors including, for example, the precisequality of the bar code label, the accuracy with which the laser lightbeam is swept across the label, the background illuminance of the barcode label, the quality of the circuitry, the intensity of the inputlaser beam and the ambient light noise present.

Bar code scanners sometimes are used in environments in which ambientmodulated light (e.g., fluorescent light) is present. In suchenvironments, the ambient light modulation is detected by thephotodetector and processed by the processing circuitry thereby reducingthe signal-to-noise ratio of the circuitry and potentially causing afaulty reading of the bar code label.

As such, it is a general object of the present invention to providesimple, yet accurate bar code scanner circuitry for reducing thenegative effects of modulated ambient light.

SUMMARY OF THE INVENTION

To achieve the foregoing object, there is provided a first nonsamplingembodiment of a bar code scanner system including a laser light sourcethat periodically produces a light beam that is swept across a bar codelabel, the laser light source being periodically turned "on" and "off"according to a duty cycle. A detector produces a first electric signalrepresentative of the received ambient and bar code label reflectedlight when the light source is on, and produces a second electric signalrepresentative of the received ambient light when the light source is"off". A demodulator circuit, coupled to the detector, provides a firstgain to the first electric signal and provides a second gain to thesecond electric signal. The gains applied are selected such that thesignal and signal component produced solely as a result of the ambientlight will significantly cancel out one another when the signals arecombined. A filter, coupled to the demodulator circuit, receives theelectric signals from the demodulator circuit and reduces out-of-bandsignal components such as noise.

The system further includes a laser pulser, coupled to the laser lightsource and the demodulator circuit, to control the duty cycle of thelaser light source. The first and second gains are related to the dutycycle.

In one embodiment, the demodulator circuit is an analog circuit. Inanother embodiment, the demodulator circuit is a digital circuit. In oneembodiment, the filter is a digital filter. In another embodiment, thefilter is an analog filter.

The system further includes a transimpedance amplifier, coupled betweenthe photodetector and the demodulator, that converts current of theelectric signals to voltage. The demodulator preferably is clocked atthe same rate as the period of the duty cycle. In one embodiment of theinvention, that period approximately is equal to 500 kHz.

The first gain is the inverse of the second gain when a 50% duty cycleis used.

Another embodiment of the invention is directed to a sampling bar codescanner system that includes a laser light source that periodicallyproduces a light beam that is swept across a bar code label. The laserlight source periodically is turned "on" and "off" according to a dutycycle. A detector produces a first electric signal representative ofboth the received ambient light and bar code label reflected light whenthe light source is "on", and produces a second electric signalrepresentative of only the received ambient light when the light sourceis "off". At least one sample and hold circuit, coupled to the detector,produces a first sampled signal from the first electric signal andproduces a second sampled signal from the second electric signal. Adifference amplifier, coupled to the sample and hold circuit, generatesa difference signal that is equal to the difference between the firstand second sampled signals. Preferably, the sample and hold circuitincludes first and second sample and hold circuits.

The system further includes a filter, coupled to the differenceamplifier, that reduces out-of-band signal components of the differencesignal. In one embodiment, the filter is an analog filter. In anotherembodiment, the filter is a digital filter.

The system further includes a laser pulser, coupled to the laser lightsource and the sample and hold circuit, that controls the duty cycle ofthe laser light source. The first sample and hold circuit is enabledwhen the laser light source is "on" and the second sample and holdcircuit is enabled when the laser light source is "off".

In another embodiment of the present invention, the bar code scannersystem includes digital demodulation circuitry. A laser light sourceperiodically produces a light beam that is swept across the bar codelabel. The laser light source is periodically turned "on" and "off"according to a predetermined duty cycle. A detector produces a firstelectric signal representative of the received ambient light and barcode label reflected light when the light source is on, and produces asecond electric signal representative of only the received ambient lightwhen the light source is "off". An analog-to-digital converter ("ADC"),coupled to the detector, respectively converts the first and secondelectric signals to first and second digital words. A digital circuit,coupled to the ADC, provides a first gain to the first digital word andprovides a second gain to the second digital word. A filter, coupled tothe digital circuit, receives the digital words from the digital circuitand reduces out-of-band signal components.

In one embodiment, the filter is a digital filter. In this embodiment,the system further includes a digital-to-analog converter ("DAC"),coupled to the digital filter, that converts the filtered words to ananalog signal.

The digital circuit includes first and second gain elements, wherein thefirst gain element is enabled when the laser light source is "on" andthe second gain element is enabled when the laser light source is "off".

The system further includes a laser pulser, coupled to the laser lightsource, that controls the duty cycle of the laser light source.

The system also includes a transimpedance amplifier, coupled between thedetector and ADC, that converts current of the electric signals tovoltage.

The system also includes a derivative amplifier, coupled to the DAC, foramplifying the analog output signal of the DAC.

According to a further embodiment of the invention, a method fordetecting the code of a bar code label comprises the steps of: with alight source, periodically producing a light beam that is swept across abar code label according to a predetermined duty cycle; receivingambient light and light reflected from the bar code label when the lightsource is on; producing a first electric signal representative of theintensity of the received ambient light and bar code label reflectedlight; receiving ambient light when the light source is off; producing asecond electric signal representative of the intensity of the receivedambient light; providing a first gain to the first electric signal;providing a second gain to the second electric signal; and filteringout-of-band signal components of the electric signals.

The method further includes the step of controlling the duty cycle. Themethod also includes the step of controlling the first and second gainsbased on the duty cycle. The method further includes the step ofconverting current of the electronic signals produced to voltage.

An even further embodiment of the present invention is directed to amethod for reducing the effects of ambient light in a bar code scannersystem comprising the steps of: controlling the duty cycle of a laserlight source to repeatedly turn "on" and "off" the light source;producing a first electric signal representative of light received by aphotodetector when the light source is on; producing a second electricsignal representative of light received by the photodetector when thelight source is off; and providing a first gain to the first electricsignal and a second gain to the second electric signal such that ambientlight signal components will be significantly canceled when the signalsare combined.

This method includes setting the second gain to be the inverse of thefirst gain when the duty cycle is equal to 50%. The method alternativelyincludes the step of setting the first gain to 4 and the second gain to-1 when the duty cycle is equal to 20% on/80% "off". The method furtherincludes the step, after the steps of producing, of separately samplingand holding the first and second electric signals.

The method, in one embodiment, includes the step of digitally providingthe first gain to the first electric signal and the second gain to thesecond electric signal. In another embodiment, the method includes usinganalog circuitry to provide the first gain to the first electric signaland the second gain to the second electric signal.

The features and advantages of the present invention will be morereadily understood and apparent from the following detailed descriptionof the invention, which should be read in conjunction with theaccompanying drawings and from the claims which are appended to the endof the detailed description.

BRIEF DESCRIPTION OF THE DRAWING

FIG. 1 is a block diagram of a first, nonsampling embodiment of a barcode scanner system of invention;

FIG. 2 is a schematic diagram of one embodiment of the demodulatorcircuit used in the system of FIG. 1;

FIG. 3 is a schematic diagram of one embodiment of an analog filter usedin the system of FIG. 1;

FIG. 4 is a schematic diagram of an alternate embodiment of an analogfilter used in the system of FIG. 1;

FIG. 5 is a timing diagram illustrating one possible duty cycle of thelaser light source;

FIG. 6 is a block diagram of another, sampling embodiment of a bar codescanner system of the invention;

FIG. 7 is a timing diagram illustrating the advantages of the samplingembodiment of FIG. 6 when used with a particular laser light source dutycycle;

FIG. 8 is a timing diagram further illustrating advantages of thesampling embodiment of FIG. 7 when used with a particular laser lightsource duty cycle;

FIG. 9 is a block diagram of a further, digital implementationembodiment of a bar code scanner system of the invention; and

FIG. 10 is a block diagram of a digital demodulation/filter circuit foruse in the system of FIG. 9.

DETAILED DESCRIPTION

FIG. 1 is a block diagram of a first embodiment of the bar code scannersystem of the present invention. Shown in FIG. 1 is a typical bar codelabel 10 including multiple dark and light parallel bars of differentwidths that represent a particular code. Also shown is a bar codescanner having a scanner head 12 and processing circuitry. Scanner head12 is shown partially diagrammatically and partially schematically.Scanner head 12 includes a laser light source 16 that produces anilluminating beam 18 that is swept across the bar code label in thedirections of arrows labeled A. Reflected from the bar code label arescattered light beams 20.

Window 22, located at the end of scanner head 12 nearest the bar codelabel, passes the illuminating beam 18 and receives a portion of thescattered light 20 reflected from bar code label 10. The portion of thereceived scattered light is that of a specific angle (with respect tothe input beam) and depends on the distance of the head 12 from the barcode label and on the width of collector 24. Collector 24 receives aportion of the reflected light 20 and directs the received light to aphotodetector 26. Photodetector 26 generates an analog electric signal,the amplitude of which is proportional to the intensity of the lightreceived. Therefore, the electric signal represents the light receivedfrom the bar code label.

As will be described in greater detail below, in accordance with thepresent invention, the laser light source periodically produces theilluminating beam 18. In other words, the laser light source 16 isrepeatedly and periodically is turned "on" and "off" in accordance witha predetermined duty cycle. Laser pulser 28 is electrically coupled tothe laser light source 16 and produces a periodic signal having apredetermined duty cycle that controls operation of the laser lightsource.

The electric output signal current is provided from the photodetector toa transimpedance amplifier 30. Shown at 29 is a typical electric outputcurrent from the photodetector. When the laser light source is off, thephotodetector produces an electric signal (represented by P_(MA)) solelyas a result of the ambient light received by the photodetector. Theambient light may be produced as a result of high efficiency modulatedlight. Typical high efficiency lights, such as fluorescent lights, aremodulated at approximately 50 kHz. When the laser light source is on,the signal produced by the photodetector is in response to the lightreflected from the bar code label (represented by P_(LBCM)) plus that ofthe ambient modulated light (P_(MA)).

The transimpedance amplifier 30 converts the current output from thephotodetector to a voltage with a high gain. A synchronous demodulatorcircuit 32 is connected to the transimpedance amplifier 30 and receivesthe voltage output by the transimpedance amplifier 30. The synchronousdemodulator operates in two modes. The demodulator 32 operates toprovide a first gain to the received voltage when the laser light sourceis "on" and to provide a second gain to the received voltage when thelaser light source is "off". For example, as will be described in moredetail below, when the duty cycle of the laser light source is equal to50% (that is when the laser light source is "on" for the same amount oftime that it is "off" for each cycle), the demodulator acts to provide again of 1 to the electric signal when the laser light source is "on" andto provide gain of -1 to the electric signal when the laser light sourceis "off".

Thus, for each on/off cycle of the light source, a positive gain of 1 isprovided to the signal produced as a result of the ambient light plusthe bar code label reflected light and a negative gain of 1 is providedto the signal produced solely as a result of the ambient light. Theambient light signal components then are effectively canceled for eachcycle in downstream filtering circuitry because the level of ambientlight noise remains substantially constant over a single cycle.

As can be seen in FIG. 1, the laser pulser 28 provides carriersynchronization pulses (which are either high or low) to the demodulator32 at the duty cycle of the laser light source to control the mode ofoperation (the positive and negative gains) of the demodulator. Itshould be appreciated that the demodulator 32 is clocked at the samerate as the duty cycle of the laser light source. In one embodiment ofthe present invention, that rate is equal to 500 kHz.

If, alternatively, the duty cycle of the laser light source is "on" for20% of the time and "off" for 80% of the time, then, for a given cycle,the current output of the photodetector will have a time-voltage productcomponent due to ambient light that is four times as great as that dueto light reflected from the bar code label plus the ambient light. Thus,the gain of the demodulator is set to 4 when the laser light source is"on" and is set to -1 when the laser light source is "off". By settingthe gains appropriately, the terms associated with the ambient light(P_(MA)) will cancel themselves out (with ideal circuitry).

The output of the demodulator 32 is coupled to derivative amplifier 34which provides amplification within a certain signal bandwidth andprovides attenuation at a higher (i.e., carrier) frequency. For example,a typical derivative amplifier of the present invention could provideapproximately 20 dB of gain around the signal bandwidth of 30 kHz andattenuation at the carrier frequency of 500 kHz. The derivativeamplifier, in other words, provides a bandwidth-limited low frequencygain. The output of the derivative amplifier is provided to a bandpassfilter that filters out-of-band unwanted signal components such as noisecontributed by the carrier and amplifier noise. Given a 50% duty cycleof the laser pulser and a two-pole analog filter, the output of thefilter gain stage 36 is represented by the following equation: V_(POUT)=V_(PLBCM) /2+V_(PMA) /2-V_(PMA) /2=V_(PLBCM) /2. As shown in theequation above, the components of the signals contributed by the ambientnoise ideally are canceled out.

The output of the filter gain stage 36 is provided to a digitizer 38which digitizes the analog output signal of the filter gain stage to adigital word. A typical digitizer for use in the present invention isdescribed in U.S. Pat. No. 5,210,397 to PSC, Inc., the assignee of thepresent application, which patent is herein incorporated by reference.

The digital word output by digitizer 38 is provided to decoder 40 whichconventionally interprets the digital data to determine the coderepresented by the bar code label. Digital label data output by decoder40 is provided on bus 42 to a host computer 44 which could, by example,be a hand-held terminal cash register or other computer.

An important feature of the present invention is that by controlling theduty cycle of the laser light source such that it repeatedly is "on" fora certain period of time then "off" for a certain period of time, andalso by controlling the positive and negative gains of the demodulatorcircuit 32 in accordance with the duty cycle, the elements of the signalcontributed by the ambient light are substantially canceled out.

FIG. 2 is a schematic diagram of one embodiment of the demodulatorcircuit 32 for use in the system shown in FIG. 1. As shown in FIG. 2,the demodulator circuit includes a first amplifier 46 and a secondamplifier 48 connected in parallel. Each amplifier 46 and 48 receives,on line 50, the bar code signal which can, for example, have a carrierfrequency of approximately 500 kHz. When the laser light source has aduty cycle of 50%, the first amplifier 46 is set to have a gain ofpositive N and the second amplifier 48 is set to have a gain of negativeN. The gain of each amplifier could be set in accordance with the dutycycle selected. The output of each amplifier is provided through aswitch 54 to a filter 56. Switch 54 is controlled by the laser pulser 28which provides a clock signal on line 52. The clock signal can have atypical carrier frequency of 500 kHz. When the laser light source is on,switch 54 connects amplifier 46 to filter 56. When the laser lightsource is off, switch 54 connects amplifier 48 to filter 56. Filter 56is a typical bandpass filter such as the one shown at 36 in FIG. 1.

As seen in FIG. 2, the demodulator circuit includes a first amplifierthat provides a first gain to the bar code signal when the laser lightsource is "on" and a second amplifier 48 that provides a second gain tothe bar code signal when the laser light source is "off". The gains ofthe respective amplifiers can be programmable or can be pre-set inaccordance with the selected duty cycle.

Filter 36 can be an analog bandpass filter. Alternatively, filter 36 canbe connected downstream of digitizer 38 and can be implemented as adigital filter. FIGS. 3 and 4 are schematic diagrams illustratingpossible analog filters for use with the system of FIG. 1.

As shown in FIG. 3, a single-pole filter includes a differential voltageamplifer 58 including a non-inverting input that receives a bias voltageV_(b) and an inverting input that receives an input voltage throughresistor R1. Connected between the output and inverting input of thedifferential voltage amplifer are a capacitor C1 and resistor R2,connected in parallel.

FIG. 4 is a schematic diagram illustrating an alternative analogtwo-pole filter in which an differential voltage amplifer 60 receives abias voltage V_(b) at its non-inverting input and receives an inputvoltage through resistors R1 and R2, connected in series, at itsinverting input. Connected between the output and inverting input of thedifferential voltage amplifer is a capacitor C2. Connected between thenode between resistors R1 and R2 and the output of the differentialvoltage amplifer is a resistor R3. Connected between resistor R3 andground is a capacitor C1.

FIG. 5 is a timing diagram illustrating an alternative duty cycle of thelaser light source. As previously stated, the synchronous demodulationtechnique is not limited to a 50% duty cycle, but can be designed foroperation with any duty cycle limited only by the speed of thedemodulator circuitry. The example shown in FIG. 5 has a 20%/80% dutycycle. In such an example, the laser light source is modulated at 20%"on" and 80% "off" per carrier cycle. The signal show has a high levelwhen the light source is "on" and a low level when the light source is"off". One cycle of the light source is shown from time zero to time t₆(time being represented on the horizontal axis). The light source is"on" from time t₁ to t₂ and is "off" from time t₂ -t₆. The light sourceagain goes "on" at time t₆. When the laser light source is on, the laserlight source illuminates the bar code label and light reflected from thebar code label and ambient light are collected by the detector andprocessed electronically. The non-inverting amplifier of the demodulatorcircuitry provides a non-inverting gain to the electronic signalproduced.

By contrast, when the laser light source is "off" (during 80% of eachcycle), only ambient light is collected by the detector and processed bythe processing circuitry. The electronic signal produced is processed bythe inverting amplifier of the demodulator. Because the ambient lightsignal is approximately constant over one carrier clock cycle, thenon-inverting gain must be four times larger than the inverting gain sothat the sum of the ambient noise signal over each cycle ideally will bezero.

It should be appreciated that the duty cycle can be altered and thecorresponding non-inverting gain and inverting gain of the demodulatorcan be altered to suit a particular application. In such an unsampledsystem (shown in FIG. 1), there is no improvement in thesignal-to-ambient light noise ratio by altering the duty cycle of thelaser light source from the 50% duty cycle. There is, however,improvement in the signal-to-electronic noise ratio for sampled systems,wherein the electronic noise is that produced by the circuit elements inthe processing circuitry. This occurs because the peak optical power ofthe laser light source is higher for shorter duty cycles (to maintainconstant average optical power, required for CDRH class II operation).

To maintain equivalent average electrical gains between implementations,the 20%/80% duty cycle system will have a normalized gain of 5 for 1/5of the carrier period, and the 50% duty cycle system will have anormalized gain of 2 for 1/2 of the carrier period. Because theinverting gain of the 20%/80% system is -5/4 for 4/5 of the carrierperiod, and the inverting gain of the 50% duty cycle system is -2 for1/2 of the carrier period, the noise gains of the two systems areequivalent, and both systems have a normalized voltage•product gain of1.

The improvement in signal-to-electronic noise ratio occurs in sampledsystems because the 20%/80% duty cycle system can have an illuminatingsource that has 2.5 times the optical power of that of the 50% system,and hence a signal-to-electronic noise ratio improvement of 2.5 to 1occurs. Thus, in systems where it is possible to alter the non-invertinggain and the inverting gain of the demodulator, it is preferable to havea duty cycle in which the laser light source is "on" for less time thanit is "off" during each cycle.

FIG. 6 is a block diagram of an alternate embodiment of the system ofthe present invention. The system of FIG. 6 is identical to that of FIG.1 except for the buffer amplifier 62, sample and hold circuits 64 and 66and difference amplifier 68. The buffer amplifier 62 is a low impedance,high output current amplifier that receives the output of thetransimpedance amplifier. The output of the buffer amplifier is providedto both sample and hold circuits 64 and 66. The sample and hold circuit64 is enabled a short time delay after the laser light source has beenturned "on" during each laser light source cycle to enable theprocessing circuitry to process the signal produced as a result of thelight source being "on". The sample and hold circuit 64 samples thesignal received from the buffer amplifier and holds the value of thatsampled signal for a certain constant duration. Sample and hold circuit64 samples and holds the electric signal produced as a result of thelight reflected from the bar code label plus the ambient light. Thatsampled signal then is provided to difference amplifier 68.

Similarly, during each laser light source cycle, sample and hold circuit66 is enabled a short time delay after the laser light source has beenturned "off" and it samples and holds, for the same constant duration,the electric signal produced solely as a result of the ambient light.The laser pulser enables and disables the sample and hold circuits 64and 66 at the appropriate times. The difference amplifier 68 produces anelectronic difference signal that is the difference between the sampledsignal provided by the sample and hold circuit 64 and the sampled signalprovided by the sample and hold circuit 66 during each cycle. Thedifference signal is the difference between the signal generated as aresult of the bar code label signal plus the ambient noise and that justof the ambient noise. Thus, the ambient noise component ideally iscanceled out. The difference signal then is provided to the derivativeamplifier 34 and then to the filter 36 and digitizer 38, as describedabove with respect to FIG. 1.

Because the signal produced as a result of the ambient light and thesignal produced as the a result of the light reflected from the bar codelabel are approximately constant over the laser clock cycle, the sampleddata (system of FIG. 6) is approximately identical in value to theunsampled signal levels (system of FIG. 1). An important advantage ofthe sampled system occurs because each sample is held until it isupdated, and thus the non-inverted and inverted samples will be equal induration and offset in phase corresponding to the duty cycle ratio ofthe light source. Therefore, the non-inverting and inverting gains willalways be equal in magnitude independent of the carrier duty cycleselected. Thus, the difference amplifier can generate a directdifference signal and the non-inverting and inverting gains do not needto be programmed or preset for each duty cycle alteration, as in theunsampled embodiment of FIG. 1.

The timing diagram of FIG. 7 illustrates certain signals of the sampleand hold system (See FIG. 6) of the present invention with a laser pulseduty cycle of 20% "on" and 80% "off". Shown in FIG. 7 are the followingsignals along the same time scale (the horizontal axis): (a) the laserpulses wherein a high level pulse is when the laser light source is "on"and a low level pulse is when the light source is off; (b) the sampledsignal from the light reflected from the bar code label (unshaded) plusthe ambient light noise (shaded); (c) the inverse of the sampled ambientlight noise signal; and (d) the difference signal which is the output ofthe difference amplifier 68 of FIG. 6.

As shown at (a), the laser pulses are "on" for 20% of the time and "off"for 80% of the time during each cycle. Shown at (b) is the sampledsignal output from sample and hold circuit 64 and includes the bar codelabel signal plus the ambient light noise signal. The signal shown at(c) simply is the inverse of the output of the sample and hold circuit66 which is the inverse of the signal generated solely from the ambientlight. It should be noted that each sample is held until it is updatedso that the non-inverted and inverted samples are equal in duration andoffset in phase in accordance with the duty cycle ratio of the laserlight source. Thus, as previously stated, the non-inverting andinverting gains always are equal in magnitude.

Shown at (d) is the sum of the signals shown at (b) and (c), or theoutput of the difference amplifier 68. Note that some noise stillremains in the summed signal because the rejection of the noise is notperfectly ideal due to the limited carrier frequency. As the carrierfrequency becomes much higher, the signal-to-noise ratio of the systemimproves.

One advantage of the sampled data system is that the filtered output ofthe sampled data will be twice that of the filtered output of theunsampled data using a 50% duty cycle and four times that of thefiltered output of the unsampled data using a 20%/80% duty cycle. Theincreased magnitude in the filtered output signal improves thesignal-to-electric noise ratio.

The timing diagram of FIG. 8 illustrates the advantage of the sampledsystem (FIG. 6) over the unsampled system (FIG. 1) in terms of theincreased magnitude in the sampled signal for a given duty cycle. Shownin FIG. 8 are the following signals: (a) the laser pulses according to a20%/80% duty cycle; (b) the sampled signal (from the light reflectedfrom the bar code label) without the noise using a sample and holdtechnique; (c) the unsampled signal using a system such as the onedescribed in FIG. 1; and (d) the average magnitude over each cycle ofthe unsampled signal shown in (c). As shown, the sampled signal (b)achieves a higher magnitude than the average of the unsampled signal at(d) over each cycle of the laser light source because the sampled signalis sampled and then held for the duration of each cycle. Thus, thesampled data technique of FIG. 6 improves the signal-o-noise ratio byincreasing the magnitude of the signal.

The following example may help illustrate a further advantage of thesampled system. In an unsampled system having a 50% duty cycle, thefiltered bar code signal is approximately equal to one half of theamplitude of the same filtered bar code signal using a sampled systemhaving the same duty cycle. In both cases, the ambient noise levels areapproximately equal. This occurs because the ambient noise isapproximately constant over a laser pulse cycle. As a result, thesampled system has approximately twice the signal-to-noise ratio of theunsampled system at a 50% duty cycle.

When using a 20% on/80% "off" duty cycle, the sampled system compareseven more favorably to the unsampled system with a 50% duty cyclebecause the laser power that illuminates the bar code label is 2.5 timesthe optical power of the 50% duty cycle system. This distinction resultsin the sampled filtered bar code signal for the 20% on/80% of duty cyclesample system being five times greater than the unsampled filtered barcode signal for the 50% duty cycle system. This accounts for the factorof one half after filtering for the unsampled 50% duty cycle system.Both systems have approximately equivalent noise levels. Therefore,approximately a five to one signal-to-noise ratio improvement results.

FIG. 9 illustrates another embodiment of the system of the presentinvention in which the demodulation of the signals is performeddigitally. The block diagram of FIG. 9 is identical to that of FIG. 6except that the digital demodulation circuit 72 replaces the sample andhold circuits 64 and 66 and the difference amplifier 68. The digitaldemodulation circuit operates by digitally applying a positive gain tothe bar code signal plus ambient light noise (produced when the laserlight source is on) and provides negative gain to the signal resultingsolely from the ambient noise (when the laser light source is off). Inthe sampled system, the digital demodulation circuit provides anon-inverting gain of 1 and an inverting gain of -1.

FIG. 10 is a block diagram illustrating the components of the digitaldemodulation circuit 72 used in the system of FIG. 9. As shown, thesystem includes an ADC 74, and edge detect element 76, a non-invertinggain element 80, an inverting gain element 82, a digital filter 88 and aDAC 92. During operation, the ADC 74 receives the voltage Vbc outputfrom the buffer amplifier. This voltage Vbc includes either the bar codesignal plus ambient light noise (when the laser light source is on) orsimply the ambient light noise (when the laser light source is off). ADC74 converts the voltage to a digital word and provides that word alongbus 78 to both gain elements 80 and 82. Edge detect element 76 receivesthe laser clock pulse as an input and provides an output signal to clockthe ADC 74. Edge detect element 76 provides a phase delay between whenthe laser light source is turned "on" or "off" (at positive and negativeedges of the laser clock pulse) and when the ADC actually converts theinput voltage to a digital data word to allow the system to settle,enabling the final voltage level to reach the input of the ADC.

The laser clock pulse also is provided to non-inverting gain element 80and the inverse of the laser clock pulse (inverted by inverse element96) is provided to inverting gain element 82 such that the non-invertinggain element is enabled when the laser light source is "on" and isdisabled when the laser light source is "off" and the inverting gainelement 82 is enabled when the laser light source is "off" and isdisabled when the laser light source is "on". Thus, non-inverting gainelement 80 provides a non-inverting gain to the digital data thatresults from the bar code signal plus ambient light noise and theinverting gain element provides an inverting gain to the digital dataresulting solely from the ambient light noise.

Non-inverting gain element 80 provides output data along bus 84 todigital filter 88. Inverting gain element 82 also provides output dataon bus 86 to digital filter 88. Digital filter 88 combines the words,reduces out-of-band signal components and provides an output on bus 90to DAC 92 which converts the output filtered word to an analog signal.The analog signal is output line 94. It should be appreciated that, inthis digital embodiment, the ADC samples are synchronous with the laserpulses so that contiguous samples of bar code signal plus ambient noiseand ambient noise alone are obtained and processed with the appropriategains and inversions and then filtered using digital signal processingfiltering techniques.

Having thus described at least one illustrative embodiment of theinvention, various alterations, modifications and improvements willreadily occur to those skilled in the art. While particular duty cycles,clock rates and modes of operation have been described, they areintended as being exemplary and the invention should not be so limited.Also, exemplary circuitry has been shown and described and the inventionalso should not be so limited. Such alterations, modifications andimprovements are intended to be within the spirit and scope of theinvention. Accordingly, the foregoing description is by way of exampleonly and is not intended as limiting. The invention is limited only asdefined in the following claims and the equivalents thereto.

What is claimed is:
 1. A bar code scanner system comprising:a laserlight source that periodically produces a light beam that is sweptacross a bar code label, the laser light source being periodicallyturned "on" and "off" according to a duty cycle; a detector thatproduces a first electric signal representative of received ambientlight and light reflected from the bar code label when the light sourceis "on" and produces a second electric signal representative of receivedambient light when the light source is off; an ADC, coupled to thedetector, that respectively converts the first and second electricsignals to first and second digital words; a digital circuit, coupled tothe ADC, that provides a first gain to the first digital word andprovides a second gain to the second digital word; and a filter, coupledto the digital circuit, reduces out-of-band signal components of thedigital words.
 2. A method for detecting the code of a bar code labelcomprising the steps of:periodically producing a light beam with a lightsource that is swept across a bar code label according to a duty cycle;receiving ambient light and light reflected from the bar code label whenthe light source is on; producing a first electric signal representativeof the intensity of the received ambient light and bar code labelreflected light; receiving ambient light when the light source is off;producing a second electric signal representative of the intensity ofthe received ambient light; providing a first gain to the first electricsignal; providing a second gain to the second electric signal; andfiltering out-of-band signal components of the electric signals.